<!DOCTYPE html>
<html dir="ltr">

<head>
  <meta charset="UTF-8">
  <title>Radio Group - Basic</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <link href="../../../../../css/ionic.bundle.css" rel="stylesheet">
  <link href="../../../../../scripts/testing/styles.css" rel="stylesheet">
  <script src="../../../../../scripts/testing/scripts.js"></script>
  <script src="../../../../../dist/ionic.js"></script>
</head>

<body>
  <ion-app>
    <ion-header>
      <ion-toolbar>
        <ion-title>Radio Group - Basic</ion-title>
      </ion-toolbar>
    </ion-header>

    <ion-content class="outer-content">
      <ion-radio-group id="dynamicDisabled" disabled name="tannen" id="group" value="biff">
        <ion-list-header>
          <ion-label>Luckiest Man On Earth</ion-label>
        </ion-list-header>

        <ion-item>
          <ion-label>Biff
            <span id="biff"></span>
          </ion-label>
          <ion-radio value="biff" slot="start"></ion-radio>
        </ion-item>

        <ion-item>
          <ion-label>Griff
            <span id="griff"></span>
          </ion-label>
          <ion-radio value="griff" slot="start"></ion-radio>
        </ion-item>

        <ion-item>
          <ion-label>Buford
            <span id="buford"></span>
          </ion-label>
          <ion-radio value="buford" slot="start"></ion-radio>
        </ion-item>

        <ion-item>
          <ion-label>George</ion-label>
          <ion-radio value="george" slot="start"></ion-radio>
        </ion-item>

      </ion-radio-group>

      <ion-button onClick="toggleDisabled()">Toggle Disabled</ion-button>
    </ion-content>

    <style>
      .outer-content {
        --background: #f2f2f2;
      }
    </style>

    <script>
      var dynamicDisabled = document.getElementById('dynamicDisabled');

      function toggleDisabled() {
        dynamicDisabled.disabled = !dynamicDisabled.disabled;
      }
    </script>
  </ion-app>
</body>

</html>
